package one;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * ClassName: ArrayExer
 * Package: one
 * Description:
 * User: fzykd
 *
 * @Author: LQH
 * Date: 2023-08-15
 * Time: 16:19
 */

public class ArrayExer {
    public static void main(String[] args) {
        //用一个数组，保存星期一到星期天的7个英语单词，从键盘输入1-7，显示对应的单词
        //{"Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"}

        String[] days = new String[]{"Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"};

        Scanner scanner = new Scanner(System.in);

        while (true){
            int day = scanner.nextInt();
            System.out.println(day);
            if (day > 0 && day <=7){
                //
                System.out.println(days[day - 1]);
            }else {
                System.out.println("数字错误 请重新输入!");
            }
        }

    }
}
